<layout name="page" />
<block name="content">
	{:widget('page_header/adv_search',array('name'=>'考勤统计','search'=>'M'))}
	<div class="x-panel hidden" id="adv_search">
		<form method="post" name="form_adv_search" id="form_adv_search">
			<div class="x-panel-header">
				<h4>高级搜索</h4>
				<div class="split"></div>
				<a  class="btn" id="submit_adv_search">搜索</a>
				<a  class="btn btn-return" id="close_adv_search">关闭</a>
			</div>
			<div class="x-panel-body">
				<div class="frame">
					<div class="box col-12">
						
							<label class="input-label" for="eq_dept_id">部门：</label>
							<div class="input-block x-select">
								<select class="input" name="eq_dept_id">
									<option value="">选择部门</option>
									{$dept_list}
								</select>
							</div>
						</div>
					</div>
					<div class="box col-12">
						
							<label class="input-label" for="eq_user_id">登录人：</label>
							<div class="input-block  x-select">
								<select class="input" name="eq_user_id">
									<option value="">选择人员</option>
									{:fill_option($emp_list)};
								</select>
							</div>
						</div>
					</div>
				</div>
				</eq>
				<div class="frame">
					<div class="box col-12">
						
							<label class="input-label" for="content">类型：</label>
							<div class="input-block x-select">
								<select class="input" name="eq_type">
									<option value="">全部</option>
									<option value="sign_in">签到</option>
									<option value="sign_out">签退</option>
									<option value="outside">外勤</option>
								</select>
							</div>
						</div>
					</div>
					<div class="box col-12">
						
							<div class="layui-inline">
								<label class="input-label">登录时间：</label>
								<div class="input-inline" style="width: 100px;">
									<input type="text" class="input input-start-date" name="be_create_time" readonly="readonly" />
								</div>
								<div class="layui-form-mid">
									-
								</div>
								<div class="input-inline" style="width: 100px;">
									<input type="text" class="input input-end-date" name="en_create_time" readonly="readonly" />
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div class="x-panel hidden">
		<div class="x-panel-body">
			<div class="pull-right">
				<a class="btn" onclick="add()">查看位置</a>
			</div>
		</div>
	</div>
	<div class="ul-table ul-table_responsive">
		<ul>
			<li class="thead">
				<span class="col-8">部门</span>
				<span class="col-6">姓名</span>
				<span class="col-6 ">职位</span>
				<span class="col-4">类型</span>
				<span class="col-13">时间</span>
				<span class="col-6">纬度</span>
				<span class="col-6">经度</span>
				<span class="col-12">IP</span>
				<span class="col-15">签到地点</span>
				<span class="col-8">签到状态</span>
				<span class="col-8">备注</span>
			</li>
			<if condition="!empty($list)">
				<li class="no-data">
					没找到数据
				</li>
				<else />
				<form method="post" action="" id="form_data">
					<foreach name="list" val="vo">
						<li class="tbody">
							<span class="col-8">{$vo.dept_name}</span>
							<span class="col-6">{$vo.name}</span>
							<span class="col-6">{$vo.position_name}</span>
							<span class="col-4">{$vo.type|sign_type}</span>
							<span class="col-13">{$vo.sign_date|substr=0,16}</span>
							<span class="col-6">{$vo.latitude|round=3,3}</span>
							<span class="col-6">{$vo.longitude|round=3,3}</span>
							<span class="col-12">{$vo.ip}</span>
							<span class="col-15 "><a class="btn-read" data="{$vo.id}" href="#" title='{$vo.location}'>{$vo.location}</a></span>
							<span class="col-8">
								<eq name="vo.status" value="1">
									正常
									<else />
									异常
								</eq> </span>
							<span class="col-12 ">{$vo.content}</span>
						</li>
					</foreach>
				</form>

			</if>
		</ul>
		<div class="pagination">
			{$page}
		</div>
	</div>

</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
		var $=layui.jquery;
		$("#btn_add").on('click', function() {
		window.open("{:url('add')}","_self");
		});
		$(".btn-read").on('click', function() {
		$id=$(this).attr('data');
		console.log(this);
		winopen(fix_url("{:url('read')}", {
		'id':$id
		}),560,470);
		});
		set_return_url(null);
		});
	</script>
</block>